<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/MerChants.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/MerChants.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: 'Foots',
        cnName: '商户配置',
        name: 'MerChants',
        url: '/MerChants/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: {
        timeContainer: [],
        merchant_Name: '',
        extendApps: '',
        merchant_Code: '',
        merchantDesc: '',
        merchantLogo: [],
        productType: '',
        channels: '',
        merchantPlatform: '',
        merchantEffectiveStartTtime: '',
        merchantEffectiveEndTtime: '',
        creator: '',
        createID: '',
        createDate: '',
        modifier: '',
        modifyID: '',
        modifyDate: '',
        realauthent: "",
        scancodeswitch: '',
      },
      editFormOptions: [
        [
          { title: '商户名称', required: true, field: 'merchant_Name', type: 'text' },
          { title: '商户编码', required: true, field: 'merchant_Code', type: 'text' },
        ],
        [{ title: '商户描述', field: 'merchantDesc', colSize: 12, type: 'textarea' }],
        [
          { title: '商户logo', maxSize: 1, required: false, field: 'merchantLogo', type: 'imgupgrade' },
          { title: '平台名称', required: true, field: 'merchantPlatform', type: 'text' },
        ],
        [{ title: '实名认证扫码', field: 'scancodeswitch', type: 'switch' },
        { title: '实名认证配置', field: 'realauthent', type: 'selectList',dataKey: 'authentication', data: [] },],
        [{ title: '有效时间', required: true, field: 'timeContainer', type: 'datetime', range: true },
        { title: '产品类型', field: 'productType', type: 'selectList', dataKey: 'type_p', data: [], required: true }],
        [{ title: '渠道', field: 'channels', type: 'selectList', dataKey: 'Distribution_Channels', data: [] },{ title: '扩展应用', field: 'extendApps',  type: 'selectList', dataKey: 'extend_app', data: [] }],
      ],
      searchFormFields: { merchant_Name: '', merchantEffectiveStartTtime: '' },
      searchFormOptions: [
        [
          { title: '商户名称', field: 'merchant_Name', type: 'like' },
          { title: '有效起始时间', field: 'merchantEffectiveStartTtime', type: 'date' },
        ],
      ],
      columns: [
        { field: 'merchant_Name', title: '商户名称', type: 'string', width: 150, require: true, align: 'left', sortable: true },
        { field: 'merchant_Code', title: '商户编码', type: 'string', width: 180, require: true, align: 'left' },
        
        { field: 'merchantLogo', title: '商户logo', type: 'imgupgrade', width: 120, require: false, align: 'left' },
        { field: 'productType', title: '产品类型', type: 'string', width: 220, require: true, align: 'left', bind: { key: 'type_p', data: [] } },
        {
          field: 'channels',
          title: '渠道',
          type: 'string',
          width: 220,
          require: true,
          align: 'left',
          bind: { key: 'Distribution_Channels', data: [] },
        },
        { field: 'extendApps', title: '扩展应用', type: 'string', width: 220, require: true, align: 'left', bind: { key: 'extend_app', data: [] } },
        { field: 'merchantPlatform', title: '商户平台名称', type: 'string', width: 220, require: true, align: 'left' },
        { field: 'merchantContract', title: '商户合同', type: 'string', width: 220, align: 'left' },
        { field: 'merchantEffectiveStartTtime', title: '有效起始时间', type: 'datetime', width: 220, require: true, align: 'left', sortable: true },
        { field: 'merchantEffectiveEndTtime', title: '有效结束时间', type: 'datetime', width: 220, require: true, align: 'left', sortable: true },
        { field: 'merchantDesc', title: '商户描述', type: 'string', width: 220, align: 'left' },
        { field: 'creator', title: '创建人', type: 'string', width: 180, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 220, align: 'left', sortable: true },
        { field: 'modifier', title: '修改人', type: 'string', width: 180, align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 220, align: 'left', sortable: true },
        { field: 'id', title: '主键', type: 'int', width: 90, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'modifyID', title: '修改人ID', type: 'int', width: 90, hidden: true, align: 'left' },
        { field: 'createID', title: '创建人ID', type: 'int', width: 90, hidden: true, align: 'left' },
      ],
      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
